""" Registers client """


from models import Client
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db


class RC(webapp.RequestHandler):
    def get(self):
        clientid=self.request.get('client_id')
        localserverip=self.request.get('local_server_ip')
        secretkey=self.request.get('secret_key')
        ip=self.request.get('ip')

        Client(client_id=clientid,
               local_server_ip=localserverip,
               secret_key=secretkey,
               ip=ip).put()

class URC(webapp.RequestHandler):
    pass
        

def main():
    app = webapp.WSGIApplication([('/rc', RC),
                                  ('/urc', URC)], debug=True)
    run_wsgi_app(app)


if __name__=="__main__":
    main()
